<template>
  <div class="header">
    <span class="mar_x" @click="$router.go(-1)"><van-icon name="arrow-left" size='20'/></span>
    <span class="flex_1">{{name}}</span>
  </div>
</template>

<script>
export default {
  props: {
    name: String
  }
}
</script>

<style lang="scss" scoped>
.header{
  z-index: 999;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  background-color: #c9261a;
  height: .4rem;
  color: white;
  font-size: 18px;
  display: flex;
  align-items: center;
  .mar_x{
    margin-left: 10px;
    line-height: 100%;
  }
  .flex_1{
    flex: 1;
    text-align: center;
  }
}
</style>
